package top.kaoshanji.p1ch02a;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 代码清单-p1ch02a-49页a：char的真正含义
 * author kaoshanji
 * ^_^
 * create time 2025/2/15 22:32
 */
public class CharExample01 {

    private static final Logger logger = LogManager.getLogger(CharExample01.class);

    public static void main(String[] args) {
        logger.info("...代码清单-p1ch02a-49页a：char的真正含义...");

        char c1 = 'A';

        // 下面都是 马
        char c2 = '马'; // 字符常量
        char c3 = 39532; // 十进制常量
        char c4 = 0x9a6c; // 十六进制常量
        char c5 = '\u9a6c'; // Unicode字符

        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
        System.out.println(c5);

        char a1 = 97; // 小写字母 a
        char a2 = 97 - 32; // 大写字母 A
        System.out.println(a1);
        System.out.println(a2);

    }

}
